﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.Services;
using EmptyWallGallery.Core;

namespace EmptyWallGallery.FrontEnd.Services
{
    /// <summary>
    /// Summary description for TopList
    /// </summary>
    public class TopList : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            //context.Response.ContentType = "application/json";
            //var pageSize = Convert.ToInt32(context.Request["PageSize"]);
            //var pageNumber = Convert.ToInt32(context.Request["PageNumber"]);

            //context.Response.Write(new Core.BLL.Articles().GetTopArticle(Configs.SiteId, 27, pageSize, pageNumber));
            //context.Response.Write(fromLotTime);
            //context.Response.Write("<br />" + toLotTime);
        }

        //public string ReturnResultData(int pageSize, int pageNumber)
        //{
        //    //PageNumber = pageNumber, 
        //    //TotalRecords = Messages().Count, 
        //    //PageSize = pageSize, 
        //    //MessageList = Messages().Skip(pageSize * pageNumber).Take(pageSize).ToList<Message>()
        //    //return new JavaScriptSerializer().Serialize(new Core.BLL.Articles().GetTopArticle(Configs.SiteId, 27, pageSize, pageNumber));
        //}

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}